package UnOfficeDeTourisme;

/**
 * Interface definition : Site
 * 
 * @author OpenORB Compiler
 */
public abstract class SitePOA extends org.omg.PortableServer.Servant
        implements SiteOperations, org.omg.CORBA.portable.InvokeHandler
{
    public Site _this()
    {
        return SiteHelper.narrow(_this_object());
    }

    public Site _this(org.omg.CORBA.ORB orb)
    {
        return SiteHelper.narrow(_this_object(orb));
    }

    private static String [] _ids_list =
    {
        "IDL:UnOfficeDeTourisme/Site:1.0"
    };

    public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId)
    {
        return _ids_list;
    }

    private static final java.util.Map operationMap = new java.util.HashMap();

    static {
            operationMap.put("_get_SGSites",
                    new Operation__get_SGSites());
            operationMap.put("_get_activationPortique",
                    new Operation__get_activationPortique());
            operationMap.put("_get_descriptionSite",
                    new Operation__get_descriptionSite());
            operationMap.put("_get_fermeture",
                    new Operation__get_fermeture());
            operationMap.put("_get_idSite",
                    new Operation__get_idSite());
            operationMap.put("_get_listeDesVisites",
                    new Operation__get_listeDesVisites());
            operationMap.put("_get_nomSite",
                    new Operation__get_nomSite());
            operationMap.put("_get_ouverture",
                    new Operation__get_ouverture());
            operationMap.put("_get_positionSite",
                    new Operation__get_positionSite());
            operationMap.put("_get_siteDisponible",
                    new Operation__get_siteDisponible());
            operationMap.put("ajouterTypeEntree",
                    new Operation_ajouterTypeEntree());
            operationMap.put("ajouterVisite",
                    new Operation_ajouterVisite());
            operationMap.put("calculerStatistiques",
                    new Operation_calculerStatistiques());
            operationMap.put("dejaVisite",
                    new Operation_dejaVisite());
            operationMap.put("getVisites",
                    new Operation_getVisites());
            operationMap.put("majSite",
                    new Operation_majSite());
    }

    public final org.omg.CORBA.portable.OutputStream _invoke(final String opName,
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler)
    {

        final AbstractOperation operation = (AbstractOperation)operationMap.get(opName);

        if (null == operation) {
            throw new org.omg.CORBA.BAD_OPERATION(opName);
        }

        return operation.invoke(this, _is, handler);
    }

    // helper methods
    private org.omg.CORBA.portable.OutputStream _invoke__get_idSite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        int arg = idSite();
        _output = handler.createReply();
        _output.write_long(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_nomSite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg = nomSite();
        _output = handler.createReply();
        _output.write_string(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_descriptionSite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg = descriptionSite();
        _output = handler.createReply();
        _output.write_string(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_positionSite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.GPS arg = positionSite();
        _output = handler.createReply();
        UnOfficeDeTourisme.GPSHelper.write(_output,arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_ouverture(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.horaire arg = ouverture();
        _output = handler.createReply();
        UnOfficeDeTourisme.horaireHelper.write(_output,arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_fermeture(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.horaire arg = fermeture();
        _output = handler.createReply();
        UnOfficeDeTourisme.horaireHelper.write(_output,arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_siteDisponible(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        boolean arg = siteDisponible();
        _output = handler.createReply();
        _output.write_boolean(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_activationPortique(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        boolean arg = activationPortique();
        _output = handler.createReply();
        _output.write_boolean(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_listeDesVisites(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.Visite[] arg = listeDesVisites();
        _output = handler.createReply();
        UnOfficeDeTourisme.listeVisitesHelper.write(_output,arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke__get_SGSites(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        org.omg.CORBA.Any arg = SGSites();
        _output = handler.createReply();
        UnOfficeDeTourisme.iorHelper.write(_output,arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_ajouterVisite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.Visite arg0_in = UnOfficeDeTourisme.VisiteHelper.read(_is);

        ajouterVisite(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_ajouterTypeEntree(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.Visite arg0_in = UnOfficeDeTourisme.VisiteHelper.read(_is);
        UnOfficeDeTourisme.TypeEntree arg1_in = UnOfficeDeTourisme.TypeEntreeHelper.read(_is);

        ajouterTypeEntree(arg0_in, arg1_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getVisites(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        try
        {
            UnOfficeDeTourisme.Visite[] _arg_result = getVisites();

            _output = handler.createReply();
            UnOfficeDeTourisme.listeVisitesHelper.write(_output,_arg_result);

        }
        catch (UnOfficeDeTourisme.ListeVideException _exception)
        {
            _output = handler.createExceptionReply();
            UnOfficeDeTourisme.ListeVideExceptionHelper.write(_output,_exception);
        }
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_majSite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.horaire arg0_in = UnOfficeDeTourisme.horaireHelper.read(_is);
        UnOfficeDeTourisme.horaire arg1_in = UnOfficeDeTourisme.horaireHelper.read(_is);

        try
        {
            majSite(arg0_in, arg1_in);

            _output = handler.createReply();

        }
        catch (UnOfficeDeTourisme.ObjetInconnuException _exception)
        {
            _output = handler.createExceptionReply();
            UnOfficeDeTourisme.ObjetInconnuExceptionHelper.write(_output,_exception);
        }
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_calculerStatistiques(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        UnOfficeDeTourisme.statistiques _arg_result = calculerStatistiques();

        _output = handler.createReply();
        UnOfficeDeTourisme.statistiquesHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_dejaVisite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        UnOfficeDeTourisme.Carte arg0_in = UnOfficeDeTourisme.CarteHelper.read(_is);

        boolean _arg_result = dejaVisite(arg0_in);

        _output = handler.createReply();
        _output.write_boolean(_arg_result);

        return _output;
    }

    // operation classes
    private abstract static class AbstractOperation {
        protected abstract org.omg.CORBA.portable.OutputStream invoke(
                SitePOA target,
                org.omg.CORBA.portable.InputStream _is,
                org.omg.CORBA.portable.ResponseHandler handler);
    }

    private static final class Operation__get_idSite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_idSite(_is, handler);
        }
    }

    private static final class Operation__get_nomSite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_nomSite(_is, handler);
        }
    }

    private static final class Operation__get_descriptionSite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_descriptionSite(_is, handler);
        }
    }

    private static final class Operation__get_positionSite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_positionSite(_is, handler);
        }
    }

    private static final class Operation__get_ouverture extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_ouverture(_is, handler);
        }
    }

    private static final class Operation__get_fermeture extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_fermeture(_is, handler);
        }
    }

    private static final class Operation__get_siteDisponible extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_siteDisponible(_is, handler);
        }
    }

    private static final class Operation__get_activationPortique extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_activationPortique(_is, handler);
        }
    }

    private static final class Operation__get_listeDesVisites extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_listeDesVisites(_is, handler);
        }
    }

    private static final class Operation__get_SGSites extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_SGSites(_is, handler);
        }
    }

    private static final class Operation_ajouterVisite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_ajouterVisite(_is, handler);
        }
    }

    private static final class Operation_ajouterTypeEntree extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_ajouterTypeEntree(_is, handler);
        }
    }

    private static final class Operation_getVisites extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getVisites(_is, handler);
        }
    }

    private static final class Operation_majSite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_majSite(_is, handler);
        }
    }

    private static final class Operation_calculerStatistiques extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_calculerStatistiques(_is, handler);
        }
    }

    private static final class Operation_dejaVisite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_dejaVisite(_is, handler);
        }
    }

}
